<template>
	<view>

		<view class="lineGray "></view>
		<view class=" margin-top-0 ">
			<view v-for="(item,index) in list " :key="index">
				<view class="line padding">
					<image class="image-head" :src="item.pictureCollection.user.avator"></image>
					<view class="column-start marginLeft bigEmpty">
						<view>
							{{item.pictureCollection.name}}
						</view>
						<view class="margin-top-0"> {{item.createTime}}</view>
					</view>
					<image class="image-small" :src="item.pictureCollection.formatImages[0]"></image>
				</view>
				<view class="lineGray margin-top-0"></view>
			</view>
		</view>
	</view>
</template>

<script>
	import request from '/common/request.js';
	export default {
		data() {
			return {
				list: [],

				loading: false

			}
		},
		onShareAppMessage(res) {
			return {
				title: '设辑-产品设计智能生成AI',
				path: '/pages/HomePage/HomePage',
				imageUrl: '/static/black-logo.png'
			}
		},
		// 自定义页面的分享到朋友圈
		onShareTimeline(res) {
			return {
				title: '设辑-产品设计智能生成AI',
				path: '/pages/HomePage/HomePage',
				imageUrl: '/static/black-logo.png'
			}
		},
		onReady: function() {
			this.requstData();
		},
		methods: {
			requstData() {
				const that = this;
				if (that.loading) {
					return
				}
				that.loading = true;
				const url = getApp().globalData.apiUrl + "/api/v1/love";
				request(url, "GET", {
						size: 100000,
						queryType:1,
						type: that.tabIndexCategory
					}, uni.getStorageSync("token"))
					.then(function(res) {
						console.log('返回正确回调', res)
						that.page = that.page + 1;
						that.loading = false;
						that.list = res.data
					}, function(err) {
						console.log('返回错误回调', err)
						that.loading = false;
					})

			},
		}
	}
</script>

<style>
	@import url("../../common/uni.css");


	
</style>